1. /* sdmprpup.cpp by K.Tsuru */
  2. // function ID 357 DRADIX, BRADIX
  3. /******************************************************************
  4. SDouble and SDecimal classes
  5. It examines whether it is proper to increase the precision by "upPrec"
  6. figures or not.It is provided for the reason that when the size exceeds
  7. the power of two by several figures,both the memory allocation and the FFT
  8. multiplication become inefficient.
  9. Although the value (effective figures)/4=509 is "PROPER", due to the use
  10. of "ProperUpPrec" in Exp(x) the evaluation time becomes later by about
  11. thirty persent, i.e. 3.5(sec)-->4.8(sec).
  12. *******************************************************************/
  13. #ifndef SN_H
  14. #include "sn.h"
  15. #endif
  16. uint SDouble::ProperUpPrec(uint upPrec) const {
  17. if(PreferSpeed() == OFF) return upPrec;
  18. uint ms = MaxSize(), sz = ceilpow2(ms);
  19. //When upPrec = 0 return 0.
  20. if(ms + upPrec <= sz) return min(sz - ms, upPrec);
  21. return 0;
  22. }

sdmprpup.cpp : last modifiled at 2015/11/25 20:20:03(954 bytes)
created at 2017/10/07 10:21:15
The creation time of this html file is 2017/10/07 10:30:03 (Sat Oct 07 10:30:03 2017).